/*
 *  Filename:      gsl_types.h
 *  Author:         Erick Huang<erickhuang1989@gmail.com>
 *  Revised:       2013-06-03
 *  Description:   Type definitions and macros.
 *
 *  Copyright (c) Erick Huang. All rights reserved.
 */

#ifndef GSL_TYPES_H
#define GSL_TYPES_H

#ifdef __cplusplus
extern "C" {
#endif  /*__cplusplus*/

#include <stdio.h>
#include <stdint.h>



typedef uint8_t  UINT8;
typedef uint16_t UINT16;
typedef uint32_t UINT32;
typedef uint64_t UINT64;
typedef int8_t   INT8;
typedef int16_t  INT16;
typedef int32_t  INT32;
typedef int64_t  INT64;

typedef uint8_t  BOOL_t;

/* CONSTANTS */
#ifndef TRUE
#define TRUE  1
#endif
#ifndef FALSE
#define FALSE 0
#endif


/* Lint Keywords */
#define GSL_VOID (void)
#define GSL_OUTP
#define GSL_INP
#define GSL_NULL_OK
#define GSL_UNUSED
#define GSL_ONLY
#define GSL_READONLY
#define GSL_SHARED
#define GSL_KEEP
#define GSL_RELAX


/* Generic Status Return Values  */
#define GSL_SUCCESS                   0x00
#define GSL_FAILURE                   0x01
#define GSL_ABNORMALLY                0X02
#define GSL_INVALID_PARA              0x03
#define GSL_INVALID_HANDLE            0X04
#define GSL_INVALID_MEM_SIZE          0x05

// Generic Status return
typedef UINT8 GSL_Status_t;



typedef UINT8 GSL_RET_t;
#define GSL_RET_NORMAL    0
#define GSL_RET_FAILED    1 

/* traver list define */
typedef UINT8 TravListRet;
#define TRAV_LIST_RET_OK      0
#define TRAV_LIST_RET_FAIL    1
#define TRAV_LIST_RET_STOP    2

typedef TravListRet (*TrListCB)(void *ctx, void *data);




#ifdef __cplusplus
}
#endif  /*__cplusplus*/

#endif  /* GSL_TYPES_H */

